/**
 *
 * @author Michael Adams
 *
 * This class really only needs the public-facing validation method,
 * as the other methods will involve private network-facing components.
 * While an employee class was contemplated, it's unneeded, and GUI was
 * giving me hysterics. I'll integrate the employeee data and suchlike
 * in a coming weekend. Until then, good 'nuff.
 */
public class UserAccount {
    private String users[] = {"user", "admin"};
    private String passes[] = {"user", "admin"};
    private boolean acctype[] = {false, true};
    
    public UserAccount()
    {}    
    
    /*
    Takes the username and password, and does voodoo to validate it.
    The current voodoo leaves quite a lot to be desired, but such are 
    prototypes.
    */
    public int Validate(String u, String p)
    {
        for (int i = 0; i < 2; i++)
        {
            if(u.equals(users[i]) && p.equals(passes[i]))
            {
                if(acctype[i])
                {
                    return 1;
                }
                return 0;
            }
        }
        return -1;
    }
}
